Conventionally, there is an input device which allows an analog input to be thereon, for example, an analog stick or the like. Conventionally, there is also a technology for making an on/off operation instruction using an input device which allows an analog input to be made thereon.
With such a method, a user may occasionally move the stick largely in order to switch between an on state and an off state. In such a case, the responsiveness to the on/off switching may be occasionally poor.
Accordingly, an object of this specification discloses a storage medium having an information processing program stored thereon by which, when an operation instruction is to be made by use of an input device, a state where there is an operation instruction can be switched to a state where there is no operation instruction, or vice versa, with high responsiveness, an information processing apparatus, an information processing system, and an instruction distinguishing method.
(1)
An example of a storage medium described in this specification is a non-transitory computer-readable storage medium having an information processing program stored thereon, the information processing program being executable by a computer of an information processing apparatus for distinguishing whether there is an operation instruction or not in accordance with an operation made on an input device. The information processing program allows the computer to act as an acquisition unit, an operation instruction distinguishing unit, and a range setting unit.
The acquisition unit acquires an input value based on the operation made on the input device. The operation instruction distinguishing unit distinguishes whether there is an operation instruction or not provided by the operation made on the input device, such that the distinguishing result is different between when the input value is within a distinguishing range, which is a prescribed range, and when the input value is outside the distinguishing range. When the input value is changed in a direction of being away from a border of the distinguishing range, the range setting unit changes a size of the distinguishing range such that the border approaches the post-change input value.
According to the structure of (1), when the input value becomes away from the border of the distinguishing range, the distinguishing range is changed to approach the input value. According to this, the distance between the input value and the distinguishing range becomes shorter, and therefore, the change amount (moving amount) of the input value usable for switching the state where there is an operation instruction to the state where there is no operation instruction, or vice versa, can be reduced. Namely, the user can easily switch the state where there is an operation instruction to the state where there is no operation instruction, or vice versa, by returning the input value slightly toward the border of the distinguishing range. In this manner, according to the structure of (1), when an operation instruction is made by use of the input device, the state where there is an operation instruction can be switched to the state where there is no operation instruction, or vice versa, with high responsiveness.
(2)
The range setting unit may set the distinguishing range to include a prescribed set range.
According to the structure of (2), in whichever manner the distinguishing range is changed in accordance with the input value, the prescribed set range is included in the distinguishing range. Therefore, the user can switch, without fail, the state where there in an operation instruction to the state where there is no operation instruction, by an operation of moving the input position to a position within the set range.
(3)
The set range may include an input value of a case where no operation is made on the input device.
According to the structure of (3), the input value of a case where no operation is made on the input device is set to be included in the set range. Therefore, the user can switch the state where there in an operation instruction to the state where there is no operation instruction, by not operating the input device (e.g., by putting his/her hand off from the stick).
(4)
The input device may include a movable member which is operable by a user and is put to a prescribed state in the case where no operation is made thereon. In this case, the acquisition unit acquires an input value which is determined by a position and/or posture of the movable member with respect to the prescribed state.
According to the structure of (4), an input unit which allows the user to make an operation input thereon by moving the movable member is used. Such an input device physically moves the movable member during the operation. Therefore, if the distinguishing range is fixed, the movable member may be moved largely from the state where it is distinguished that there is an operation instruction to the state where it is distinguished that there is no operation instruction. By contrast, according to the structure of (4), the distinguishing range is changed in accordance with the input value. Therefore, the distance by which the movable member of the above-described input device is moved for switching the state where there is an operation instruction to the state where there is no operation instruction, or vice versa, can be shortened. Namely, the user can easily switch the state where there is an operation instruction to the state where there is no operation instruction, or vice versa.
(5)
The acquisition unit may acquire a two-dimensional input value. In this case, the range setting unit sets a distinguishing range representing a two-dimensional area on a coordinate plane provided for representing the two-dimensional input value.
According to the structure of (5), even when the input value is two-dimensional, it can be distinguished whether or not the input value is included in the distinguishing range at once, with no need of executing the distinguishing processing for each of the components. Therefore, the distinguishing processing can be executed easily. In the case where the structure of (5) is combined with the structure of (13) described below, the instruction direction can be accurately calculated by use of a two-dimensional distinguishing range.
(6)
The range setting unit may set the distinguishing range as a circular area on the coordinate plane, the circular area being centered around a position of an input value of a case where no operation is made on the input device.
According to the structure of (6), the distinguishing range can be easily managed by use of the length of the radius. In addition, the processing of distinguishing whether or not the input value is included in the distinguishing range can be executed by comparing the distance from the position of the input value of a case where there is no operation made on the input device to the input value against the length of the radius of the distinguishing range, and thus the calculation for the distinguishing processing is simplified.
(7)
When a direction from the central position of the circular area to the position of the input value is changed larger than a prescribed angle, the range setting unit may change the distinguishing range to be reduced.
According to the structure of (7), when the direction from the central position of the circular area to the position of the input value (input direction) is largely changed, the distinguishing range is reduced. In the case where the input direction is largely changed, if the distinguishing range is not changed, the post-change input value is within the distinguishing range. As a result, it may be undesirably distinguished that there is no operation instruction. By contrast, according to the structure of (7), the distinguishing range is reduced in the above case. Therefore, such wrong distinguishing can be prevented, and it can be accurately distinguished whether there is an operation instruction or not.
(8)
When the input value is changed in a direction of being away from the border of the distinguishing range, the range setting unit may set the distinguishing range to be a circular area, a central position of which is moved in a direction in accordance with the direction of change of the input value.
According to the structure of (8), the distinguishing range is set such that the central position thereof is moved in a direction in accordance with the direction of change of the input value. According to this, the distinguishing range is enlarged mainly in such a direction. Therefore, in the other directions, the ratio of enlargement is small (see FIG. 13). In this case, when the input direction is largely changed, the possibility that the post-change input position is included in the distinguishing range is low. Therefore, according to the structure of (8), the possibility that, when the input direction is largely changed, the post-change input position is included in the distinguishing range and as a result, it is wrongly distinguished that there is no operation instruction can be alleviated.
(9)
The range setting unit may include a reference point setting unit and a range determination unit. The reference point setting unit sets a reference point such that when a position of the input value is changed in a direction of being away from the reference point, the reference point is changed to approach a position of the post-change input value. The range determination unit determines the distinguishing range such that the reference point is on the border thereof. Thus, the distinguishing range is set.
According to the structure of (9), the reference point is set in accordance with the input value, so as to be within a prescribed range from the input value. Accordingly, when the input direction is largely changed, the distinguishing range is reduced (see FIG. 16). Therefore, such a situation that it is distinguished that there is no operation instruction against the intention of the user can be prevented, and thus the operation instruction can be accurately distinguished.
(10)
When the input value is changed in a direction of approaching a position of the reference point, the range setting unit may maintain the position of the reference point.
According to the structure of (10), when the input value is changed in a direction of approaching the position of the reference point, the position of the reference point is not changed. Therefore, in this case, the distinguishing range is not changed, either. Thus, the user can switch, without fail, the state where there is an operation instruction to the state where there is no operation instruction, or vice versa, by operating the input value to approach the border.
(11)
When the input value is changed in a direction of being away from the border of the distinguishing range, the range setting unit may set the distinguishing range such that the border thereof is away from a position of the post-change input value by a prescribed distance.
According to the structure of (11), the distinguishing range can be easily controlled such that the border of the distinguishing range is located within a certain distance from the position of the input value. Namely, the user can switch, without fail, the state where there is an operation instruction to the state where there is no operation instruction, or vice versa, by moving the input value to approach the distinguishing range by at least the certain distance.
(12)
When the input value is changed in a direction of approaching the border of the distinguishing range, the range setting unit maintains the distinguishing range.
According to the structure of (12), when the input value is changed in a direction of approaching the border of the distinguishing range, the distinguishing range is not changed. Therefore, the user can switch, without fail, the state where there is an operation instruction to the state where there is no operation instruction, or vice versa, by operating the input value to approach the border of the distinguishing range.
(13)
The information processing program may allow the computer to act as a direction calculation unit. When it is distinguished by the operation instruction distinguishing unit that there is the operation instruction, the direction calculation unit calculates a direction of a position of the input value with respect to a prescribed reference position on the coordinate plane provided for representing a two-dimensional input value.
According to the structure of (13), the user can instruct a direction by use of the input device, and the responsiveness of the operation of instructing a direction by use of the input device can be improved.
(14)
When the input value outside the distinguishing range is changed in a direction of being away from the border of the distinguishing range, the range setting unit may set the distinguishing range to be enlarged.
According to the structure of (14), by the enlargement of the distinguishing range, the border of the distinguishing range is allowed to approach the input value. Owing to this, the user can easily provide a state where there is no operation instruction by returning the input value slightly toward the distinguishing range, and the responsiveness of switching the state where there is an operation instruction to the state where there is no operation instruction can be improved.
(15)
The range setting unit may set the distinguishing range such that an upper limit thereof is a range which is away from the border of a region of positions that the input value can assume by at least a prescribed distance.
According to the structure of (15), the distinguishing range does not become too large. Therefore, such a situation that it is distinguished that there is no operation instruction against the intention of the user can be prevented, and thus the operation instruction can be accurately distinguished.
(16)
When the input value within the distinguishing range is changed in a direction of being away from the border of the distinguishing range, the range setting unit may set the distinguishing range to be reduced.
According to the structure of (16), by the reduction of the distinguishing range, the border of the distinguishing range is allowed to approach the input value. Owing to this, the user can easily provide the state where there is an operation instruction by moving the input value to a position slightly outside the distinguishing range. Thus, the responsiveness of switching the state where there is no operation instruction to the state where there is an operation instruction can be improved. In the case where the structure of (14) is combined with the structure of (16), the border of the distinguishing range is allowed to approach the input value both when the input value is within the distinguishing range and when the input value is outside the distinguishing range. Owing to this, the responsiveness of switching the state where there is an operation instruction to the state where there is no operation instruction, or vice versa, can be improved.
(17)
The range setting unit may set the distinguishing range such that a lower limit thereof is a range which includes an input value of a case where no operation is made on the input device.
According to the structure of (17), the distinguishing range does not become too small. Therefore, such a situation that it is distinguished that there is an operation instruction against the intention of the user can be prevented, and thus the operation instruction can be accurately distinguished.
(18)
When the input value is within the distinguishing range, the operation instruction distinguishing unit may distinguish that there is no operation instruction; and when the input value is outside the distinguishing range, the operation instruction distinguishing unit may distinguish that there is an operation instruction.
According to the structure of (18), with an input device by which when there is no operation made thereon, the input value is a certain reference value, and when an operation is made thereon, the input value is away from the reference value, the state where there is an operation instruction can be switched to the state where there is no operation instruction, or vice versa, with high responsiveness.
In this specification, an information processing apparatus and an information processing system including units equivalent to the units realized by execution of the information processing program of (1) through (18) are disclosed. Also in this specification, an instruction distinguishing method (method for distinguishing whether there is an operation instruction or not) which is executable by (1) through (18) is disclosed.
According to the storage medium having the above-described information processing program stored thereon, the above-described information processing apparatus, the above-described information processing system, and the above-described instruction distinguishing method, the border of the distinguishing range, provided for distinguishing whether there is an operation instruction or not, is changed in accordance with the change of the input value so as to approach the input value. By such an arrangement, an operation instruction is made by use of the input device, the state where there is an operation instruction can be switched to the state where there is no operation instruction, or vice versa, with high responsiveness.
These and other objects, features, aspects and advantages will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.